	<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>旅游游记，分享你旅途中的快乐 - 蜂窝煤</title>
<meta name="description"
	content="旅游达人的经验分享，全在这里哦" />
<meta name="keywords" content="蜂窝煤旅游日志" />
<meta name="renderer" content="webkit" />
<script>
	function repalceHtml(str){  
    var dd=str.replace(/<\/?.+?>/g,"");  
    var dds=dd.replace(/ /g,"");//dds为得到后的内容  
    dds=dds.substring(1,200);
    alert(dds); 
	}  
	</script>

<script type="text/javascript">
	window.Env = {
		"WWW_HOST" : "www.mafengwo.cn",
		"IMG_HOST" : "images.mafengwo.net",
		"P_HOST" : "passport.mafengwo.cn",
		"P_HTTP" : "https:\/\/passport.mafengwo.cn",
		"PAGELET_HTTP" : "http:\/\/pagelet.mafengwo.cn",
		"JS_HOST" : "js.mafengwo.net",
		"UID" : 0,
		"CSTK" : "fb4d0d49484f4b81e905a66bcb075c39_b0b03ae4f500c7a6600f1141ad1df06d",
		"GOOGLE_MAP_KEY" : "AIzaSyD-Su0x_rPy1xehlMBcMyTqWkU49Bk53nQ",
		"TONGJI_HOST" : "tongji.mafengwo.cn"
	};
</script>
<script>
	function getplacename(op){
	var placeid = op;
	document.getElementById("hotornew").value="placename";
	document.getElementById("morehotornew").value="1";
	document.getElementById("hideplaceid").value=placeid;
	var placenamekey=document.getElementById("diaryseachinput").value;
	$.getJSON("DiaryServlet",{flag:"seachdiarybyplaceid",placeid:placeid},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";		
		}
		$("#getdiarydetail").html(str);
		
		});	
	
	}

	function getseachdairytolist(){
	document.getElementById("hotornew").value="seachdiarybykey";
	document.getElementById("morehotornew").value="1";
	var placenamekey=document.getElementById("diaryseachinput").value;
	$.getJSON("DiaryServlet",{flag:"seachdiarybykey",placenamekey:placenamekey},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!=null){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";		
		}
		$("#getdiarydetail").html(str);
		
		});	
	
	}




	function gethotdiary(){
	document.getElementById("hotornew").value="hot";
	document.getElementById("morehotornew").value="1";
	$.getJSON("DiaryServlet",{flag:"gethotdiary"},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
		$("#getdiarydetail").html(str);
		
		});	
	}

	function getnewdiary(){
	document.getElementById("hotornew").value="new";
	document.getElementById("morehotornew").value="1";
	$.getJSON("DiaryServlet",{flag:"getnewdiary"},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
		$("#getdiarydetail").html(str);
		
		});	
	}

	function getmorehotornew(){
		$('#showdiv').hide();
		$('#hidediv').show();
		//判断加载的是热门、最新    还是   按地点
		//热门or最新的标签当前的页数
		var morehotornew = $("#morehotornew").val();
		//热门or最新的标签
		var hotornewflag=$("#hotornew").val();
		if(hotornewflag=="hot"){		
		$.getJSON("DiaryServlet",{flag:"getmorehotdiary",morehotornew:morehotornew},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";				
		}
		var getnewpage ="<div class='_j_pager'>"+
						 "<div class='ft ft_load_btn' id='showdiv'>"+
						"<div class='answer-more _j_add_more_button'>"+
							"<a onclick='getmorehotornew()'>加载更多<i></i></a>"+
						"</div>"+
					"</div>"+
					"<div class='ft ft_loading _j_add_loading_button hide' id='hidediv'>"+
						"<div class='answer-loading'>"+
							"正在加载<i></i>"+
						"</div>"+
						"</div>"+
					"</div>";
		$("#getdiarydetail").html(str);
		$("#getnewpage").html(getnewpage);

		});		
		}else if(hotornewflag=="seachdiarybykey"){
		var placenamekey=document.getElementById("diaryseachinput").value;		
		$.getJSON("DiaryServlet",{flag:"getmoreseachdiary",morehotornew:morehotornew,placenamekey:placenamekey},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
		var getnewpage ="<div class='_j_pager'>"+
						 "<div class='ft ft_load_btn' id='showdiv'>"+
						"<div class='answer-more _j_add_more_button'>"+
							"<a onclick='getmorehotornew()'>加载更多<i></i></a>"+
						"</div>"+
					"</div>"+
					"<div class='ft ft_loading _j_add_loading_button hide' id='hidediv'>"+
						"<div class='answer-loading'>"+
							"正在加载<i></i>"+
						"</div>"+
						"</div>"+
					"</div>";
		$("#getdiarydetail").html(str);
		$("#getnewpage").html(getnewpage);

		});		
		}else if(hotornewflag=="new"){	
		var morehotornew = $("#morehotornew").val();
		$.getJSON("DiaryServlet",{flag:"getmorenewdiary",morehotornew:morehotornew},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
		var getnewpage ="<div class='_j_pager'>"+
						 "<div class='ft ft_load_btn' id='showdiv'>"+
						"<div class='answer-more _j_add_more_button'>"+
							"<a onclick='getmorehotornew()'>加载更多<i></i></a>"+
						"</div>"+
					"</div>"+
					"<div class='ft ft_loading _j_add_loading_button hide' id='hidediv'>"+
						"<div class='answer-loading'>"+
							"正在加载<i></i>"+
						"</div>"+
						"</div>"+
					"</div>";
		$("#getdiarydetail").html(str);
		$("#getnewpage").html(getnewpage);
		
		});						
		}else if(hotornewflag=="placename"){
		var morehotornew = $("#morehotornew").val();
		var placeid = document.getElementById("hideplaceid").value;
		$.getJSON("DiaryServlet",{flag:"getmoreplacediary",morehotornew:morehotornew,placeid:placeid},function(data){
		var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
		var getnewpage ="<div class='_j_pager'>"+
						 "<div class='ft ft_load_btn' id='showdiv'>"+
						"<div class='answer-more _j_add_more_button'>"+
							"<a onclick='getmorehotornew()'>加载更多<i></i></a>"+
						"</div>"+
					"</div>"+
					"<div class='ft ft_loading _j_add_loading_button hide' id='hidediv'>"+
						"<div class='answer-loading'>"+
							"正在加载<i></i>"+
						"</div>"+
						"</div>"+
					"</div>";
		$("#getdiarydetail").html(str);
		$("#getnewpage").html(getnewpage);
		});
		
		}
		document.getElementById("morehotornew").value = parseInt(morehotornew)+1;
		
		
	}

	function getbegindiary(){
	$.getJSON("DiaryServlet",{flag:"getbegindiary"},function(data){
	var str="";
		for(var i=0;i<data.length;i++){
		var userlogo = "";
		if(data[i].diary_user.user_logo!='/null'){
		userlogo="<img class='_j_filter_click' src='"+data[i].diary_user.user_logo+"'>";
		}else if(data[i].diary_user.user_logo=='/null'){
		userlogo="<img class='_j_filter_click' src='image/userlogo.png'>";
		}
		var placelogo="";
		if(data[i].diary_logo!='/null'){
		placelogo="<img src='diaryimage"+data[i].diary_logo+"' width='150' height='100'>";
		}else if(data[i].diary_logo=='/null'){
		placelogo="<img src='image/diarylogo.jpg' width='150' height='100'>";
		}
		var con=data[i].diary_content;
		var dd=con.replace(/<\/?.+?>/g,"");  
        var dds=dd.replace(/ /g,"");//dds为得到后的内容  
        con=dds.substring(1,150);
		str=str+"<div class='bd newcate-bd'>"+
					"<ul class='_j_pager_box'>"+      
						"<li class='item clearfix' data-qid='"+data[i].diary_user.user_id+"'>"+
							"<div class='title'>"+
								"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank'>"+data[i].diary_title+"</a>"+
							"</div>"+
							"<div class='container'>"+
								"<div class='avatar'>"+
									userlogo+
								"</div>"+
								"<div class='user-info'>"+ 
									data[i].diary_user.user_status+":"+
									data[i].diary_user.user_name+
								"</div>"+
								"<div class='desc clearfix'>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='color: #666;'>"+
									placelogo+
										"<p>"+con+"...</p>"+
									"</a>"+
								"</div>"+
								"<div class='tags'>"+
									 "<a class='a-tag _j_filter_click' href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' target='_blank'>"+data[i].diary_place.place_name+"</a>"+ 
								"</div>"+
								"<div class='operate'>"+
									"<div class='zan'>"+
										"<i></i>"+data[i].diaryComNum+"</div>"+
									"<div class='mdd'>"+
										"<a href='PlaceServlet?flag=query&op="+data[i].diary_place.place_id+"' class='_j_filter_click' target='_blank'><i class='_j_filter_click'></i>"+data[i].diary_place.place_name+"</a>"+
									"</div>"+
									"<a href='DiaryDetailServlet?flag=diarydetail&diaryid="+data[i].diary_id+"' target='_blank' style='text-decoration: none;'> <span class='reply'>评论</span>"+
									"</a> <span class='date'><i></i>发布于"+data[i].diary_time+"</span>"+
								"</div> </div> </li> </ul>";			
		}
	$("#getdiarydetail").html(str);
	});	
	}
</script>
<link href="http://css.mafengwo.net/css/cv/css+base:css+jquery.suggest:css+plugins:css+plugins+jquery.jgrowl:css+other+popup:css+app+topbar_v2^alw^1527308432.css" rel="stylesheet" type="text/css"/>


<link href="http://css.mafengwo.net/css/mfw-ask/mfw-ask.css?1492702270" rel="stylesheet" type="text/css"/>

<script language="javascript" src="http://js.mafengwo.net/js/cv/js+jquery-1.8.1.min:js+global+json2:js+M+Module:js+M+M:js+M+Log:js+m.statistics:js+advert+inspector^alw^1527559450.js" type="text/javascript" crossorigin="anonymous"></script>
<style type="text/css">
.button {    
    display: inline-block;    
    zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */    
    *display: inline;    
    vertical-align: baseline;    
    margin: 0 2px;    
    outline: none;    
    cursor: pointer;    
    text-align: center;    
    text-decoration: none;    
    font: 14px/100% Arial, Helvetica, sans-serif;    
    padding: .5em 2em .55em;    
    text-shadow: 0 1px 1px rgba(0,0,0,.3);    
    -webkit-border-radius: .5em;     
    -moz-border-radius: .5em;    
    border-radius: .5em;    
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);    
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);    
    box-shadow: 0 1px 2px rgba(0,0,0,.2);    
}    
.button:hover {    
    text-decoration: none;    
}    
.button:active {    
    position: relative;    
    top: 1px;    
}    
    
.bigrounded {    
    -webkit-border-radius: 2em;    
    -moz-border-radius: 2em;    
    border-radius: 2em;    
}    
.medium {    
    font-size: 12px;    
    padding: .4em 1.5em .42em;    
}    
.small {    
    font-size: 11px;    
    padding: .2em 1em .275em;    
}    

.orange {    
    color: #fef4e9;    
    border: solid 1px #da7c0c;    
    background: #f78d1d;    
    background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));    
    background: -moz-linear-gradient(top,  #faa51a,  #f47a20);    
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');    
}    
.orange:hover {    
    background: #f47c20;    
    background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));    
    background: -moz-linear-gradient(top,  #f88e11,  #f06015);    
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');    
}    
.orange:active {    
    color: #fcd3a5;    
    background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));    
    background: -moz-linear-gradient(top,  #f47a20,  #faa51a);    
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');    
}    

</style>

</head>
<body onload="getbegindiary()">
	 <jsp:include page="travelhead.jsp"></jsp:include>
	<div class="wrapper wrapper-new" data-cs-t="wenda">
		<div class="col-main">

			<div class="i-main">
				<div class="mt-nav clearfix i_link">					
				</div>
			<!-- 搜索功能 -->
				<div class="search-box">
					<div class="search-panel" data-cs-t="wenda">
						<div class="clearfix _j_suggest_hd">
							<div class="sp-input">
								<input type="text" id="diaryseachinput" value=""
									placeholder="提问前请先搜索，看看你的问题其他煤煤是否已经问过">
							</div>
							<input type="button" id="diaryseachbutton" class="sp-button" onclick="getseachdairytolist()" >
						</div>
						<div class="bd _j_suggest_box hide"></div>
					</div>
				</div>
			</div>


			
			<!-- 游记开始 -->
			<input type="hidden" id="hideplaceid" value="0">
			<input type="hidden" id="hotornew" value="hot">		
			<div class="newcate-wrap _j_qa_list" >
				<div class="hd">
					<ul class="cate-tab">
					<div style="color: orange;">
					<input type="button" onclick="gethotdiary()" value="热门游记" class="button orange">
					<input type="button" onclick="getnewdiary()" value="最新游记" class="button orange">
            		</div>
					</ul>
				</div>			
			<input type="hidden" id="morehotornew" value="1">
				<!-- 游记分页的开始 -->
				<div id="getdiarydetail">					  
				
					
				
				 
				 </div>
				<!-- 游记分页的结束 -->
				
				
				
				<!-- 分页功能 -->
				<div id="getnewpage">
				<div class="_j_pager" >
					<div class="ft ft_load_btn" id="showdiv">
						<div class="answer-more _j_add_more_button" >
							<a onclick="getmorehotornew()">加载更多<i></i></a>
						</div>
					</div>
					<div class="ft ft_loading _j_add_loading_button hide" id="hidediv">
						<div class="answer-loading" >
							正在加载<i></i>
						</div>
					</div>
				</div>
				</div>
				<!-- 分页功能 end-->
			</div>
			<!-- 游记结束 -->
			
		</div>
		
		
		
		
		<div class="col-side">

			<div class="i-ask">
				<a href="adddiary.jsp" class="btn-ask btn-ask2"><i></i>发表游记</a>
			</div>


			<div class="i_total">

				


				<div class="i_num">
					共<span id="q_total">${requestScope.diaryNum}</span>游记<span id="u_total">${requestScope.diarycomUserNum}</span>人参与评论
				</div>
			</div>






			<dl class="i-tags tag-area _j_tags">
				<dt>游记热门地区</dt>
				<dd class="clearfix">
					<div class="label">地点</div>
					<ul class="_j_open_mdd_list">
					<c:forEach var="mylist3" items="${requestScope.mylist3}">
						<li><a href="#" onclick="getplacename('${mylist3.place_id}')">${mylist3.place_name}<em>${mylist3.placeComNum}</em></a></li>
						<br>
						</c:forEach>
						<li class="_j_mdd_see_more"><a class="more_selector"
							data-cs-p="index_foreign_seemore">更多</a></li>
					</ul>
				</dd>
				</dl>


			<div class="rank _j_rank" style="margin-top: 20px;">
				<div class="hd">
					评论排行榜 
				</div>
				 
				<div class="bd">
				<ul class="rank-list _j_rank_list">
				<c:forEach var="mylist2" items="${requestScope.mylist2}" varStatus="status" begin="0" end="0">
				<li class="r-top r-top1 clearfix"> <em class="num">1</em>
            		<div class="user no_qid">
               		 <a class="avatar" href="#" target="_blank" rel="nofollow"><img src="${mylist2.user_logo}"></a>
               		 <span class="name"><a href="#" target="_blank" rel="nofollow">${mylist2.user_name}</a></span>
               		 <span class="level"><a href="#" target="_blank" rel="nofollow">${mylist2.user_status}</a></span>
            		</div>
            			<span class="num">${mylist2.diaryComNum}</span>
        		</li>
        		</c:forEach>
        		<c:forEach var="mylist2" items="${requestScope.mylist2}" varStatus="status" begin="1" end="1">
        		<li class="r-top r-top2 clearfix">
            	<em class="num">2</em>
           		 <div class="user no_qid">
             	   <a class="avatar" href="#" target="_blank" rel="nofollow"><img src="${mylist2.user_logo}"></a>
              	  <span class="name"><a href="#" target="_blank" rel="nofollow">${mylist2.user_name}</a></span>
              	  <span class="level"><a href="#" target="_blank" rel="nofollow">${mylist2.user_status}</a></span>
         		   </div>
           			 <span class="num">${mylist2.diaryComNum}</span>
    		    </li>
        		</c:forEach>
        		<c:forEach var="mylist2" items="${requestScope.mylist2}" varStatus="status" begin="2" end="2">
        		<li class="r-top r-top3 clearfix">
          		  <em class="num">3</em>
           			 <div class="user no_qid">
            		    <a class="avatar" href="#" target="_blank" rel="nofollow"><img src="${mylist2.user_logo}"></a>
            	    <span class="name"><a href="#" target="_blank" rel="nofollow">${mylist2.user_name}</a></span>
            	    <span class="level"><a href="#l" target="_blank" rel="nofollow">${mylist2.user_status}</a></span>
        		    </div>
         		   <span class="num">${mylist2.diaryComNum}</span>
      			  </li>
      	  		</c:forEach>
        		
        		
				<c:forEach var="mylist2" items="${requestScope.mylist2}" varStatus="status" begin="3">									 
						 <li class="clearfix"> <em class="num">${status.index+1}</em>
							<div class="user no_qid">
								 <a class="avatar" href="#" target="_blank" rel="nofollow">
								 <img src="${mylist2.user_logo}"></a>
								<span class="name">${mylist2.user_name}</span> 
								<span class="level">${mylist2.user_status}</span>
							</div> <span class="num">${mylist2.diaryComNum}</span></li>					
				</c:forEach>
				
				
				
				</ul>
				</div>
				
			</div>
		</div>
</div>
	<link href="http://css.mafengwo.net/mobile/css/omc/coupon-pop/coupon-pop.css?1526627473" rel="stylesheet" type="text/css" />


	<script language="javascript" src="http://js.mafengwo.net/mobile/js/activity/app_newer_180.js?1526627474"
		type="text/javascript" crossorigin="anonymous"></script>
	<link href="http://css.mafengwo.net/css/mfw-footer.css?1517883076"
		rel="stylesheet" type="text/css" />

 <div>
	 <jsp:include page="about-us.jsp"></jsp:include>
	</div>
	



</body>
</html>
